package product

import (
	"github.com/xinliangnote/go-gin-api/internal/pkg/core"
	"github.com/xinliangnote/go-gin-api/internal/repository/mongodb"
	"github.com/xinliangnote/go-gin-api/internal/repository/redis"
	"github.com/xinliangnote/go-gin-api/internal/services/product"
	"go.uber.org/zap"
)

var _ Handler = (*handler)(nil)

type Handler interface {
	i()
	Create() core.HandlerFunc
	List() core.HandlerFunc
	Update() core.HandlerFunc
	Delete() core.HandlerFunc
}

type handler struct {
	logger         *zap.Logger
	productService product.Service
	cache          redis.Repo
}

func New(logger *zap.Logger, db mongodb.Repo, cache redis.Repo) Handler {
	return &handler{
		logger:         logger,
		productService: product.New(db),
		cache:          cache,
	}
}

func (h *handler) i() {}
